powered by
Creates a matrix of zeros or ones.
zeros(nx = 1, ny = nx) ones(nx = 1, ny = nx)
The number of rows. Default is 1.
The number of columns. Default is nx.
nx
Return of nx x ny matrix of zeros of ones.
zeros and ones create full matrices of zeros and ones. If the user only provides an input for nx, the produced matrices are nx x nx square matrices.
zeros
ones
# NOT RUN { zeros() zeros(3) ones(4,5) # Will fail try(ones('3','3')) # }
Run the code above in your browser using DataLab